<!DOCTYPE html>


<html>
<head>
	<title>对象</title>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
    
        // 创建对象
        <script>
            let obj ={
            uname :'pink老师',
            age:25,
            gender:'女',
            song: function(x,y){
                console.log(x+y)
        },
            dance: function(){
            console.log('跳舞');
    }
        };
        
            obj.song(1,2);// 
            obj.gender = '男';// 修改对象属性
            console.log(obj);
            console.log(obj.uname);
            console.log(obj.gender);
            delete obj.age; // 删除对象属性
            delete obj.age; // 删除对象属性
            console.log(obj);
            console.log(obj['gender']);
    
            
        </script>
</body>
</html>